import Login from '@/page/login/Login.vue';
import QQRedirect from '@/page/login/QQRedirect.vue';
import Main from '@/components/main/main.vue';
import PageNotFound from '@/page/error-page/404.vue';


export const routerConfig = [
    {
        path: '/',
        redirect: '/login'
    },
    {
        path: '/login',
        component: Login,
        meta: {
            title: '登录'
        }
    },
    {
        path: '/main',
        name: 'main',
        meta: {
            title: '首页',
            require_auth: true
        },
        redirect: '/dashboard',
        component: Main,
        children: [
            // 后台获取的路由
        ]
    },
    {
        path: '/QQRedirect',
        name: 'QQRedirect',
        component: QQRedirect
    },
    {
        path: '/404',
        name: 'PageNotFound',
        meta: {
            title: 'Page Not Found',
            require_auth: false
        },
        component: PageNotFound
    }
    // 所有未定义的路由,全部重定向至404页
    // {
    //     path: '/:catchAll(.*)',
    //     redirect: '/404'
    // }
]
